-
Notifications
You must be signed in to change notification settings - Fork 593
HDDS-10483. Container Balancer should only move containers with size greater than 0 bytes #6447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…greater than 0 bytes
sumitagrawl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarvekshayr Thanks for working over this, have minor comment
...m/src/test/java/org/apache/hadoop/hdds/scm/container/balancer/TestContainerBalancerTask.java
Outdated
Show resolved
Hide resolved
|
Why is this change needed? If there is a skew in zero size objects it will show in the heartbeat load form a Datanode. |
@kerneltime |
...server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/FindSourceGreedy.java
Outdated
Show resolved
Hide resolved
sumitagrawl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM +1
siddhantsangwan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarvekshayr Thanks for working on this. The code change looks good, but we should have an explicit unit test that asserts balancer only selects positive size containers. This ensures we don't have to depend on another unit test that's meant to test a different behaviour.
Added a unit test to assert the expected behaviour of the balancer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, waiting for CI.
|
@sarvekshayr can you look into the CI failures? |
|
The balancer test had probably failed because of #6481. Recon failure looks unrelated. |
|
Merged to master with green CI. Thanks @sarvekshayr and all the reviewers. |
…greater than 0 bytes (apache#6447)
…greater than 0 bytes (apache#6447) (cherry picked from commit 80c2311)
…s with size greater than 0 bytes (apache#6447) (apache#112) Co-authored-by: Sarveksha Yeshavantha Raju <79865743+sarvekshayr@users.noreply.github.com>
…greater than 0 bytes (apache#6447) (cherry picked from commit 80c2311)
What changes were proposed in this pull request?
Introduced a check on the size containers allowed to move during the balancing process.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10483
How was this patch tested?
Added a unit test
balancerShouldMoveOnlyPositiveSizeContainersto assert that balancer selects only positive size containers.Also tested using the existing test
balancerShouldObeyMaxSizeLeavingSourceLimit()inTestContainerBalancerTask.java. It passed successfully, ensuring that the balancer selected only containers with a size greater than 0 bytes, even when zero-byte containers were present.